package models;

import java.util.*;

import javax.persistence.*;
 
import play.data.validation.Required;
import play.db.jpa.*;
/**
 * RelationRequest Entity, Used to create relation request
 * 
 * @author Menna Magdy
 */
@Entity
public class RelationRequest extends Model{
	/**
	 * name of the relation
	 */
	@Required
	@ManyToOne
	/**
	 * ID of the sender
	 */
	public User sender;
	@Required
	@ManyToOne
	/**
	 * Id of the reciever
	 */
	public Organization organization;
	@Required
	/**
	 * name of the relation
	 */
	public String relationName;
	@Required
	/**
	 * the message of the request
	 */
	public String message;
	/**
	 * Default constructor
	 * 
	 * @param Ssender
	 *            the organization of the new relation name
	 *@param receiver
	 *             the receiver of the request "organizationLead"
	 * @param relationName
	 *            new name of the relation
	 * @param message
	 *             the message included in the request
	 * @author Menna Magdy                       
	 */
	public RelationRequest(User sender,Organization organization,String relationName,String message) {
		this.sender = sender;
		this.organization=organization;
		this.relationName=relationName;
		this.message = message;
	}

}
